package com.zjsd.sqeybusiness.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjsd.sqeybusiness.mapper.PlatformProductCategoryMapper;
import com.zjsd.sqeybusiness.domain.PlatformProductCategory;
import com.zjsd.sqeybusiness.service.IPlatformProductCategoryService;

/**
 * 平台产品分类Service业务层处理
 *
 * @author Zheng
 * @date 2020-11-05
 */
@Service
public class PlatformProductCategoryServiceImpl implements IPlatformProductCategoryService
{
    @Autowired
    private PlatformProductCategoryMapper platformProductCategoryMapper;

    /**
     * 查询平台产品分类
     *
     * @param categoryId 平台产品分类ID
     * @return 平台产品分类
     */
    @Override
    public PlatformProductCategory selectPlatformProductCategoryById(Long categoryId)
    {
        return platformProductCategoryMapper.selectPlatformProductCategoryById(categoryId);
    }

    /**
     * 查询平台产品分类列表
     *
     * @param platformProductCategory 平台产品分类
     * @return 平台产品分类
     */
    @Override
    public List<PlatformProductCategory> selectPlatformProductCategoryList(PlatformProductCategory platformProductCategory)
    {
        return platformProductCategoryMapper.selectPlatformProductCategoryList(platformProductCategory);
    }

    /**
     * 新增平台产品分类
     *
     * @param platformProductCategory 平台产品分类
     * @return 结果
     */
    @Override
    public int insertPlatformProductCategory(PlatformProductCategory platformProductCategory)
    {
        return platformProductCategoryMapper.insertPlatformProductCategory(platformProductCategory);
    }

    /**
     * 修改平台产品分类
     *
     * @param platformProductCategory 平台产品分类
     * @return 结果
     */
    @Override
    public int updatePlatformProductCategory(PlatformProductCategory platformProductCategory)
    {
        return platformProductCategoryMapper.updatePlatformProductCategory(platformProductCategory);
    }

    /**
     * 批量删除平台产品分类
     *
     * @param categoryIds 需要删除的平台产品分类ID
     * @return 结果
     */
    @Override
    public int deletePlatformProductCategoryByIds(Long[] categoryIds)
    {
        return platformProductCategoryMapper.deletePlatformProductCategoryByIds(categoryIds);
    }

    /**
     * 删除平台产品分类信息
     *
     * @param categoryId 平台产品分类ID
     * @return 结果
     */
    @Override
    public int deletePlatformProductCategoryById(Long categoryId)
    {
        return platformProductCategoryMapper.deletePlatformProductCategoryById(categoryId);
    }
}
